Reporting Custom Calculations
Custom calculations can be reported using the default report definition values (found in the “value” drop down list, or by writing a user function). If using “Custom Result # - Last” or “Custom Result # - Total”, values reported will be for the asset currently selected only, not for the inflowing wells and facilities. Select “User Function Total” and the apply function @CustomRollup(#) to report results that include all inflowing assets.

Click image to expand or minimize.

Click image to expand or minimize.

Click image to expand or minimize.
Using CustomRollup with Report Groups
If you need to use the @CustomRollup(#) function in Report Groups, an additional column must be added to the report for the data to be generated correctly. For each custom result that is referenced in a CustomRollup function (i.e., the # argument in the function), you will need another report column that is set to the Property of the Custom Result used in the CustomRollup column.
For example, if you have a report column that is the rollup of Custom Calculation 1, the function would be @CustomRollup(1) and you will need another column that is set to Custom Result 1 - Total (or Custom Result 1 - Last depending on your use case). This is a limitation with the way grouped report data is calculated in Enersight and may be addressed at some point in the future.
Using CustomRollupProduct to Follow a Product Through the Network
In Enersight 2.17, we introduced a new function for use in reporting: CustomRollupProduct. This function is similar to CustomRollup but with one enhancement: it requires a second argument that is a product. The result is that the reported values respect pipeline splits throughout the network based on the product entered in the function. A shortcoming of CustomRollup is that when there are splits in the network, the values reported at nodes after the split are always calculated without taking into consideration the amount of product that flowed down each path of the network. CustomRollupProduct allows you to report values that respect the amount of product that flows down each split in the network.
For example, a well that produces 1000 mcf of gas and is a 60/40 split between 2 facilities and a Custom Calculation Result that reports the production volume (let's say it's Custom 1 for this example), CustomProduct(1) would report 1000 mcf at both facilities. However, CustomProduct(1, C1), where C1 is the product to follow through the network, reports 600 mcf and 400 mcf at each subsequent facility, respecting the network split.

The products that can be entered as the second argument in the function can be found in the function editor. In the Asset tab, expand the Products list. Note that 'Gas' is not a valid product, as it's components can have different splits. C1 is commonly used to follow Gas through the network.
